package route;

public class Location {
	private int number;
	private String roadName;

	public Location(int number, String roadName) {
		this.number = number;
		this.roadName = roadName;
	}

	public boolean passAcross(String roadName) {
		return this.roadName.equals(roadName);
	}

	@Override
	public String toString() {
		return this.number + " : " + this.roadName;
	}

	@Override
	public boolean equals(Object o) {
		if (o == null || o instanceof Location)
			return false;
		else {
			return this.number == number && this.roadName.equals(roadName);
		}
	}
}
